<template>
  <div class="app">
    <Editor v-model="state" :formdata="formdata"></Editor>
  </div>
</template>

<script>
import data from "./data.json";
import { ref, provide } from "vue";
import Editor from "./packages/editor.jsx";
import { registerComponent as config } from "./dragComponents/index";
export default {
  name: "App",
  components: { Editor },
  setup() {
    const state = ref(data);
    provide("config", config);

    const formdata = ref({
      username: "ll",
      password: 123,
    });
    return {
      state,
      formdata,
    };
  },
};
</script>

<style lang="scss">
.app {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
}
</style>
